Method of switching between video sequences and corresponding device

ABSTRACT

The invention relates, in encoding/decoding systems, to an improved method of switching from a first coded video sequence to a second one. In order to avoid underflow or overflow of the decoder buffer, a transcoding of the input streams IS1 and IS2 is used to shift the temporal position of the switching point and to obtain at the output of the provided transcoders ( 11, 12 ) streams TS1 and TS2 containing an identical entry point and the same decoder buffer characteristics.

[0001] The present invention relates to a method of switching from afirst coded video sequence to a second one, said video sequences havingbeen encoded by different video encoders using regulation buffers, andto a corresponding switching device. This invention may be used forinstance in MPEG1 or MPEG2 encoding/decoding systems.

[0002] Encoding systems such as those according to the MPEG2 standardproduce data at variable rates (encoded pictures have variable sizes inbits) and require an output data buffer in order to feed the (constantbitrate) transmission channel. Similarly the corresponding decodersrequire an input data buffer to enable them to use data from saidchannel at the required variable rates. The transmitted encoded pictureswill therefore not spend the same time in the decoder buffer. As aconsequence, when switching from a first video sequence to a second one,the respective decoder buffer delays at the transition (or switchingpoint) are not equal.

[0003] It is known indeed that, thanks to the abstract model of decodingVBV (Video Buffer Verifier) defined in the MPEG standard, it is possibleto verify that an MPEG bitstream is decodable with reasonable bufferingand delay requirements (expressed in the sequence header, in the fields“bitrate” and “buffer size”). This model of VBV is that of a receivingbuffer for the coded bitstream and an associated instantaneous decoderso that all the data for a picture are instantaneously removed from saidreceiving buffer. Within the framework of this model, constraints on thebitstream (by way of the buffer occupancy) have been defined so thatdecoding can occur without buffer underflow or overflow. If said firstand second sequences to be switched have been separately encoded, such arisk of overflow or underflow for the decoder buffer however exists.

[0004] In order to prevent such a risk, the switching operation may beperformed in the decompressed domain where all the decoded pictures areagain described with the same number of bits and last a same duration.Said pictures are then sent to a conventional mixer for switching, andrecoded before transmission. Such a solution, described for example inthe international patent application WO 97/08898, is however rathercomplex. Moreover, a decoding step followed by a re-encoding one damagesthe picture quality.

[0005] It is therefore an object of the invention to propose anotherswitching method that overcomes these drawbacks.

[0006] To this end the invention relates to a switching method such asdescribed in the preamble of the description and wherein the switchingstep is preceded by a transcoding step of each of said coded sequences,provided for shifting the temporal position of the switching point. Theinvention also relates to a corresponding device.

[0007] The basic idea of this solution is to transcode the input encodedstreams such that they have at the switching point, now chosen aposteriori, the same decoder buffer characteristics, and particularlybuffer delays that now are equal.

[0008] The particularities and advantages of the invention will nowbecome apparent from the following description and the accompanyingdrawings, in which

[0009]FIG. 1 is an illustration of the method and device according tothe invention;

[0010]FIG. 2 shows a transmission chain including a transcoder

[0011]FIG. 3 shows an example of transcoder buffer boundariescorresponding to measures taken during the transcoding step

[0012]FIG. 4 shows the transcoded bitstream

[0013]FIG. 5 shows an implementation of each transcoding circuit of adevice according to the invention.

[0014] The switching method and device according to the invention areillustrated in FIG. 1, that shows transcoding devices 11 and 12receiving input coded streams IS1 and IS2 (corresponding to first andsecond original video sequences, for instance to a national televisionprogramme and to a local one) and delivering corresponding outputtranscoded streams TS1 and TS2. These streams TS1 and TS2 now contain anidentical entry point, as it will be explained, and may be sent towardsthe switcher 15. At the output of said switcher, an output stream OS isavailable that corresponds, with respect to the input streams, to thatone called the second video sequence, the other input stream being thenthe first one.

[0015] In a transcoding operation, a compressed sequence with a firstgiven format is converted into another one with another format. Thetranscoding operation here proposed is used to shift the temporalposition of the switching point so that the input coded streams willhave the same decoder buffer characteristics (which was not the case forseparately encoded streams). This shifting of the temporal position ofthe switching point is obtained by modifying the number of bitsallocated to the encoding of the video parts preceding and followingsaid switching point, while the total number of bits used by eachtranscoded stream remains equal to the one used by the correspondinginput stream.

[0016] A transmission chain is illustrated in FIG. 2: it includes atranscoder 22 between an encoder 21 and a decoder 23, shown with theirbuffers. According to the invention, the output bit rate of eachtranscoder is equal to its input bit rate. There is indeed no change inthe bit rate, only the picture start positions are changed (shifted) inorder to create a seamless splicing point keeping ensured the stabilityof the decoder buffer.

[0017] The transcoding operation has to ensure the decoder bufferstability for the output stream, and must therefore avoid overflow orunderflow of said buffer. Critical times for the decoder buffer overfloware the ones just before decoding a picture, i.e. the timesD(t(k))+t(k), the notations being the following ones

[0018] t(k) time at which the start code of the picture number k entersthe transcoder

[0019] D(t(k))=delay between transcoder buffer input and decoder output(as seen for instance in FIG. 2)

[0020] By definition of D(t(k)), one has:

D(t(k)=VBV_delay_out( k)+F(t(k))/R  (1)

[0021] and

D(t(k)+t(k)=D(t(k−1))+t(k−1)+1/P  (2)

[0022] with:

[0023] P=frame rate (and 1/P=frame period).

[0024] R=video bit rate

[0025] F(.) =transcoder buffer fullness at concerned time (.).

[0026] VBV_delay_out(k)=VBV delay of picture number k at the transcoderoutput/decoder input.

[0027] For defining the VBV delay, one must recall that the VBV (VideoBuffering Verifier), considered as connected to the output of theencoder, has the same clock frequency and picture rate as said encoder(they are operated synchronously). The VBV has a decoding buffer of sizeS (where S is given in the so-called vbv_buffer_size field of thesequence header) that is initially empty and is filled by the bitstreamfor a time specified in the so-called vbv_delay_field of the videobitstream. After each picture interval, all of the data for the picturewhich, at that time, has been in the buffer longest is instantaneouslyremoved. The VBV is examined immediately before removing any data andimmediately after each picture is removed, and its occupancy must thenlie between 0 and S bits.

[0028] In the present case, to avoid overflow and underflow of thedecoder buffer, the transcoder buffer fullness has therefore to bebounded. The boundaries B(MIN) and B(MAX) are defined according to thefollowing relation:

B(MIN)≦F(t(k))≦B(MAX)  (3),

[0029] by considering the decoder at the most critical times.

[0030] For the decoder buffer overflow, said critical times are the onesjust before decoding a picture (i.e. the times t(k)+D(t(k)). Just beforesuch times, the decoder buffer fullness, at time t(k)+D(t(k)), is givenby FDEC(t(k)+D(t(k))):${{{{FDEC}\left( \quad \right.}\quad {t(k)}} + {D\left( {t(k)} \right)}} = {{\int_{t{(j)}}^{{t{(k)}} - {D{({t{(k)}})}}}{{R_{indec}(t)} \cdot {t}}} - {\left\{ {{F\left( {t(j)} \right)} + {\sum\limits_{i = j}^{k - 1}{{sizepic}(i)}}} \right\} 1}}$

[0031] with:

[0032] tj=time at which the decoder buffer is considered as empty;

[0033] R_(indec)=bit rate at the decoder buffer input (=R_(out));

[0034] R_(out) 32 bit rate at the transcoder buffer output;

[0035] sizepic(i)=size of the picture i.

[0036] As it is wanted that FDEC (t(k)+D(t(k))≦S (S being, as alreadysaid, the decoder buffer size), it can be deduced, after somecomputations, that:B(MIN) = MAX  {0, ∫_(t(k))^(t(k) + D(t(K)))R_(cut)(t) ⋅ t − S}(4)2

[0037] Similarly, for the decoder buffer underflow, the most criticaltimes are the ones just after decoding a picture (i.e. the timest(k)+D(t)(K)), which allows to deduce, after some similar computations,the relation giving B(MAX):B(MAX) = ∫_(t(k))^(t(k) + D(t(k)) − 1/P)R_(out)(t)⋅dt  (5)  3

[0038] Moreover, the transcoding has to guarantee a specified decoderbuffer delay at the transition point, which leads to a determinedtranscoder buffer fullness value at the transition point. Two otherboundaries converging toward this value have therefore to be introduced.An illustration of all these transcoder buffer boundaries is given inFIG. 3 (transcoder buffer fullness TBF versus time t), with thefollowing notations

[0039] B(MIN) and B(MAX), for the lower and upper boundaries introducedby the decoder buffer stability constraints;

[0040] BFT, for the buffer fullness to be guaranteed at the transitionpoint TP;

[0041] BT(MIN) and BT(MAX), for the converging boundaries introduced bythe transition point constraints.

[0042] It must also be indicated that the transcoding operation is onlyuseful, and therefore only performed, within a temporal windowpositioned around the transition point arrival time in the transcoder.As shown in FIG. 4, this temporal window starts a sufficient delay(transcoding start=TST) before the transition point arrival time, sothat the wanted decoder buffer constraints are really obtained at thispoint, and also ends another sufficient delay (transcoding end=TED)after said transition point arrival time, so that the decoder buffercharacteristics of the transcoded stream become equal to the ones of thecorresponding input stream. Outside this temporal window, the transcoderis equivalent to a delay line, said delay having no effect on the imagequality.

[0043] The structure of each transcoding device of FIG. 1 is thereforethe following, as illustrated in FIG. 5: it comprises in series avariable length decoder 51, an inverse quantizer 52, a quantizer 53, avariable length encoder 54 (also designated by the references VLD, Q⁻¹,Q and VLC respectively), and a buffer 55. A regulation circuit 56provided at the output of said buffer allows to modify the quantizationstepsize in the quantizer 53. In parallel with the first branchconstituted by these elements 51 to 56, a delay line 57 forming a secondbranch is provided (the delay it introduces is equal to the transcodingdelay). A switching circuit 58 receives on two inputs the outputs ofsaid first and second branches. As already seen, the input bit rate atthe inputs of said branches and the output bitrate at the output of theswitching circuit 58 have the same value.

1. A method of switching from a first coded video sequence to a secondone, said video sequences having been encoded by different videoencoders using regulation buffers, wherein the switching step ispreceded by a transcoding step of each of said coded sequences, providedfor shifting the temporal position of the switching point.
 2. A devicefor switching from a first coded video sequence to a second one, saidvideo sequences having been encoded by different video encoders usingregulation buffers and said device comprising a switching circuit thatreceives on two inputs coded input bistreams corresponding to said firstand second video sequences and yields an output stream corresponding toonly one of said coded input bitstreams, wherein each input of theswitching circuit is preceded by a transcoding circuit.